refactor: fix compiler warnings across runtime and utils#1665
Conversation
ComixHe
commented
May 18, 2026
- std::reference_wrapper causing the compiler to trigger SFINAE trait checks on RunContext while it was still an incomplete type. So replace it with raw pointer
- Fixed some warnings caused by the use of C++20 extensions
- Add [[nodiscard]], noexcept, explicit enum types
- Extract RuntimeLayer to separate compilation unit
|
Skipping CI for Draft Pull Request. |
There was a problem hiding this comment.
Code Review
This pull request refactors the RuntimeLayer class into its own dedicated files and modernizes several components with [[nodiscard]], explicit, and noexcept qualifiers. It also improves the Cmd::exec utility by using pipe2 with O_CLOEXEC, refining environment variable handling, and ensuring proper file descriptor management. A critical issue was identified where the removal of the <list> header in run_context.h would cause a compilation error because the std::list container is still utilized within that file.
- std::reference_wrapper causing the compiler to trigger SFINAE trait checks on RunContext while it was still an incomplete type. So replace it with raw pointer - Fixed some warnings caused by the use of C++20 extensions - Add [[nodiscard]], noexcept, explicit enum types - Extract RuntimeLayer to separate compilation unit Signed-off-by: Yuming He <ComixHe1895@outlook.com>
deepin pr auto review这份 Git Diff 包含了大量的代码重构、性能优化、安全加固以及代码规范性的改进。整体来看,改动质量很高,显著提升了代码的健壮性。以下是我对各个维度的详细审查意见: 一、 语法与逻辑
二、 代码质量
三、 代码性能
四、 代码安全
四、 代码安全
总结这是一次非常高质量的提交。重点解决了底层命令执行模块( 无需进一步修改即可合入,建议合入后持续关注 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ComixHe, reddevillg The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |